package com.serviceImpl;

import com.domain.Team;
import com.dao.TeamDao;
import com.server.TeamService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service("teamService")
public class TeamServiceImpl implements TeamService{

    @Resource(name="teamDao")
    private TeamDao teamDao;

    public Team findNameByTeamId(Integer team_id) {
        return teamDao.findNameByTeamId(team_id);
    }



    @Override
    public List<Team> showTeam() {

        return teamDao.showTeam();
    }


    @Override
    public Integer deleteByTeamId(Integer team_id) {
        return teamDao.deleteByTeamId(team_id);
    }

    @Override
    public List<Team> teamSelect(String name, String leader) {
        return teamDao.teamSelect(name,leader);
    }

//    @Override
//    public int findTeamTotal() {
//        return teamDao.findTeamTotal();
//    }

    public Integer deleteTeamByLeader(String leader){
        return teamDao.deleteTeamByLeader(leader);
    }
}
